package com.itheima.flowcontrol.loop;

/**
 * 8848860毫米 我有一张纸厚度是0.1 折叠多少次 可以到8848860
 */
public class WhileDemo02 {
    public static void main(String[] args) {
        test01();
    }

    private static void test01() {
        double paper = 0.1;
        double high = 8848860;
        int number = 0;
        while (paper < high) {
            paper = paper * 2;
            number++;
            System.out.println("paper的高度=");
            System.out.println(paper);
        }

        System.out.println("需要折叠的次数="+ number);
    }
}
